<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>hello world</p>
<input type="text">
<script>
    document.getElementsByTagName('p')[0].setAttribute('title','aaaa');
    let userName = document.getElementsByTagName('input')[0];
    userName.setAttribute('value','zhangsan');
    userName.setAttribute('disabled',true);
    userName.removeAttribute('disabled');
    console.log(userName.getAttribute('value'))
</script>
</body>
</html>